<?php
namespace app\admin\controller;

use app\common\controller\AdminBaseController;

class ResourceController extends AdminBaseController
{
    //上传图片
    public function uploadImgOp()
    {
        return htSuccessReturn(lang('UPLOAD_SUCCESS'),app('resource_api')->uploadImg());
    }
    //上传文件
    public function uploadFileOp()
    {
        return htSuccessReturn(lang('UPLOAD_SUCCESS'),app('resource_api')->uploadFile());
    }
    //获取资源列表
    public function getResourceListPageOp()
    {
        return htSuccessReturn(lang('GET_SUCCESS'),app('resource_api')->getResourceListPage());
    }
    //获取资源信息
    public function getResourceRowOp()
    {
        return htSuccessReturn(lang('GET_SUCCESS'),app('resource_api')->getResourceRow());
    }
    //编辑资源信息
    public function saveResourceEditOp()
    {
        return htSuccessReturn(lang('SAVE_SUCCESS'),app('resource_api')->saveResourceEdit());
    }
    //删除获取信息
    public function saveResourceDelOp()
    {
        return htSuccessReturn(lang('DEL_SUCCESS'),app('resource_api')->saveResourceDel());
    }
    //设置资源状态
    public function setResourceStatusOp()
    {
        return htSuccessReturn(lang('SET_SUCCESS'),app('resource_api')->setResourceStatus());
    }
    //获取资源路径
    public function cleanUpExpiredFilesOp()
    {
        return htSuccessReturn(lang('GET_SUCCESS'),app('resource_api')->cleanUpExpiredFiles());
    }
}
